/*This file is part of AENIMA. AENIMA is a module of BCI++ framework for the implementation of brain computerinterface systems. 
AEnima is intended for use with BCI++ only.

BCI++ is a project of the Sensibilab of the Politecnico di Milano. 

AENIMA is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as 
published by the Free Software Foundation, either version 3 of 
the License, or (at your option) any later version.

AENIMA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License
and the GNU Lesser General Public License along with AENIMA.  
If not, see <http://www.gnu.org/licenses/>.*/

/*!
	\file	LedDriver.h
	 Header file for LEDs Driver.

	\author	info.sensibilab@polimi.it

	\date	2007-09-06 creation \n
		2009-01-27 last modification

	\b COPYRIGHT: 
		This program is property of Sensibilab - Campus Ponit - Lecco
*/
// LedDriver.h: interface for the LedDriver class.
//
//////////////////////////////////////////////////////////////////////
#include "LedDriver_base.h"

#if !defined(AFX_LEDDRIVER_H__6A0AF19E_C75E_4A7A_84AB_CB75B51CBDD4__INCLUDED_)
#define AFX_LEDDRIVER_H__6A0AF19E_C75E_4A7A_84AB_CB75B51CBDD4__INCLUDED_


#include <iostream>

using namespace std;

/*!\class LedDriver
Class for LEDs driver (for SSVEP). The communication is done with USB virtual COM. The LEDs
frequencies are set by the PC.*/
class LedDriver: public LedDriver_base
{
public:
	LedDriver();
	virtual ~LedDriver();
	/*!\fn void Close()
	Close the serial communication with external stimulators.*/
	void Close();
	/*!\fn int Stop()
	Turn off the LEDs*/
	int Stop();
	/*!\fn int Start()
	Function to start the LEDs.*/
	int Start();
	/*!\fn int SetPeriods(int* pPeriods, char num)
	Function for the setting of the frequencies. In this function can be set up to 8 frequencies.
	\param pPeriods Array with frequencies:\n
	0 = left\n
	1 = right\n
	2 = up\n
	3 = down\n
	...
	\param num Number of frequencies to be set.*/
	int SetPeriods(int *pPeriods,char num);
	/*!\fn int Init(char *pPortName)
	This function initialize the serial port.\n The serial port (selected in AEnima command line)
	is set with a boudrate of 38400.
	\param pPortName Name of the serial port for the LEDs.*/
	int Init(char *pPortName);
	/*!Device della porta seriale*/
	//wxSerialPort *pDev;		
};

#endif // !defined(AFX_LEDDRIVER_H__6A0AF19E_C75E_4A7A_84AB_CB75B51CBDD4__INCLUDED_)
